-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/847 allow caching multi arch builds #1467
Feature/847 allow caching multi arch builds #1467
Conversation
Added a new member to the parsed arguments struct to store the architecture related arguments.
Instead of raising a cannot cache error, store the arch arguments in their own vector.
Pass arch args to parsedArguments initialisation
Rewrite the arch args for use in the preprocessor command. This is done to reflect the architectures being used while not causing clang to error due to multiple architectures being specified.
Fixed naming of unused variable from match
Include the architecture arguments when generating the hash key. Without this, commands that are identical apart from the architecture will be treated as the same.
Updated tests to make sure to initialise parsedArguments with the new arch args vector.
Make sure to include the arch args in the command used for compilation.
Updated test in clang.rs so that it no longer expects a cannot_cache result to be returned.
Updated gcc test that expected a cannot_cache result when multiple arguments are provided.
Added a unit test to make sure arch args get rewritten correctly.
Use string formatting and iter rather than push and a loop
Use vector extend rather than a for loop.
Increase cache version to reflect change in what is used to generate the hash key.
Codecov ReportBase: 29.85% // Head: 30.02% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1467 +/- ##
==========================================
+ Coverage 29.85% 30.02% +0.16%
==========================================
Files 47 47
Lines 16974 16642 -332
Branches 8056 7870 -186
==========================================
- Hits 5068 4997 -71
+ Misses 6504 6336 -168
+ Partials 5402 5309 -93
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I guess you saw the clippy warning |
Formatted code with rustfmt
Refactored match statement into map as per clippy hint.
Yeah, thanks. I think I've fixed it now |
It looks great. could you please update the doc with this info ? |
Updated the docs on caching to reflect the updated hash key generation.
Updated now. Hopefully its clear enough as is but happy to tweak it. |
This is great, thanks |
Latest 0.4.1 which includes this PR breaks multi-arch compilation that uses -Xarch flags. |
Updated handling of c/c++ build commands with multiple
-arch
flags in response to #847.Testing has predominantly been done on macOS.